home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
003
/
bargraf.arc
/
GRAFPROC.PRG
< prev
Wrap
Text File
|
1987-03-30
|
2KB
|
99 lines
* Program..: Grafproc.PRG
* Author...: Jon Wind
* Date.....: March 30, 1987
* Version..: dBASE III PLUS
* Note(s)..: This is the procedure file for Grafem.PRG.
*
* dBASE III PLUS procedures:
PROC graframe
PARA f_row,framec,t_row,title,titlec
SET COLO TO &titlec
@t_row,(80-LEN(title))/2 SAY title
SET COLO TO &framec
@f_row-10,10 TO f_row,10
@f_row,10 SAY CHR(212)
@f_row,11 TO f_row,69 DOUB
PUBL row0
row0=f_row-1
cnt=0
DO WHIL cnt<101
@f_row,5 SAY STR(cnt,3)+IIF(cnt>0," _","")
@f_row-1,9 SAY IIF(cnt<100,"_","")
cnt=cnt+20
f_row=f_row-2
ENDD
RETU
PROC bargraf
PARA var,barwidth,grafrow,grafcol,graflbl,bar_color
row=row0
grafval=2.5
SET COLO TO &bar_color
@grafrow,grafcol+(barwidth/2)-(LEN(graflbl)/2) SAY graflbl
DO WHIL grafval<101 .AND. grafval<=var
IF var>=grafval+5
@row,grafcol SAY REPL(CHR(219),barwidth)
ELSE
IF var>=grafval
@row,grafcol SAY REPL(CHR(220),barwidth)
ENDI
ENDI
grafval=grafval+10
row=row-1
ENDD
SET COLO TO
RETU
* dBASE III procedures:
PROC grafram2
PARA f_row,framec,t_row,title,titlec
SET COLO TO &titlec
@t_row,(80-LEN(title))/2 SAY title
SET COLO TO &framec
@f_row,10 SAY CHR(212)+SUBS(dbar,1,58)
PUBL row0
row0=f_row-1
cnt=0
DO WHIL cnt<101
@f_row,5 SAY STR(cnt,3)
IF cnt>0
??" _"+CHR(179)
ENDI
IF cnt<100
@f_row-1,9 SAY "_"+CHR(179)
ENDI
cnt=cnt+20
f_row=f_row-2
ENDD
RETU
PROC bargraf2
PARA var,barwidth,grafrow,grafcol,graflbl,bar_color
row=row0
grafval=2.5
SET COLO TO &bar_color
@grafrow,grafcol+(barwidth/2)-(LEN(graflbl)/2) SAY graflbl
DO WHIL grafval<101 .AND. grafval<=var
IF var>=grafval+5
@row,grafcol SAY SUBS(full,1,barwidth)
ELSE
IF var>=grafval
@row,grafcol SAY SUBS(half,1,barwidth)
ENDI
ENDI
grafval=grafval+10
row=row-1
ENDD
SET COLO TO 7
RETU